<?php
	namespace Home\Controller;
	use Think\Controller;
	
	class SetTtoController extends Controller
	{
		public function index()
		{
			//获取ID值
			$id=$_POST['id'];
			
			if($id!="")
			{
				//先将id存入数据库
				$arr=array('sikaoid'=>$id);
				$save=M("tbid")->where("id=1")->save($arr);
				//获取当前用户账号及密码
				$userName=$_SESSION['usersk']['userName'];
				$password=$_SESSION['usersk']['password'];
				$newid=$userName.$password.$id;
				
				
				if($newid!=null)
				{
					$this->success("完成",__APP__."/Tto/index/newid/$newid");
					
				}else
				{
					$this->success("失败",__APP__."/SetTto/index/");
				}
			}else
			{
				$this->display();
			}
		}
		/* public function yz()
		{
			//获取ID值
			$newid=$_GET['newid'];
			if($newid!=null)
			{
				$this->success("完成",__APP__."/Tto/index/newid/$newid");
			}else
			{
				$this->success("失败",__APP__."/SetTto/index/");
			}
		} */
	}
?>